package com.fhz.day005

import androidx.room.*

/**
 * 时间:2021/10/18
 * @author msfeng
 * 简述: TODO
 */
@Dao
interface UserDao{

    @Insert
    fun insertUser(user:User) : Long

    @Update
    fun updateUser(user:User)

    @Delete
    fun delUser(user:User)

    @Query("select * from User")
    fun queryAll() : List<User>

    @Query("select * from User where id = :id")
    fun queryUserById(id:Int) : User
}